home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 October / CHIP Turkiye Ekim 2000.iso / prog / naps / 16 / README < prev    next >
Encoding:
Text File  |  2000-07-23  |  15.4 KB  |  477 lines

  1. opennap v0.35 (ALPHA)
  2. the open source (TM) napster server
  3. ===================================
  4. July 23, 2000
  5.  
  6. http://opennap.sourceforge.net
  7. IRC: #opennap on irc.openprojects.net and EFNet
  8. Email: opennap-dev@lists.sourceforge.net
  9.  
  10. opennap is an Open Source(TM) server implementation of the popular
  11. Napster protocol.  It is written in ANSI C and was designed to run on Unix
  12. platforms.  So far this server has been tested on:
  13.     * Linux (i386, alpha, sparc, ppc)
  14.     * BSDI
  15.     * FreeBSD
  16.     * Solaris
  17.     * IRIX
  18.     * OS/2
  19.     * Windows 95/98/NT/2000 (MS VC++)
  20. Minimal porting should be required for compilation on other Unix variants
  21. (if you do a port, please send patches to drscholl@users.sourceforge.net)
  22.  
  23. Since Napster is not an open specification, much of the internals of the
  24. servers are specific to this implementation.  In particular, I don't expect
  25. that this server will interoperate with the official Napster servers once they
  26. are linked together.  Given that I can't run tcpdump between those servers,
  27. I can't see how they are communicating.  I'm hoping that with the proliferation
  28. of servers outside of napster.com, they might be willing to open up their
  29. specification to make sure all the clients can interoperate.  However, this
  30. server should be compliant with the several currently available Unix Napster
  31. clients.
  32.  
  33. Main differences from the official napster servers:
  34. * servers can be linked together fully (chat and search)
  35. * channel operators can be defined to moderate specific channels
  36. * source code is freely available
  37.  
  38. What's included?
  39. * opennap server
  40. * metaserver for directing clients to server groups
  41. * protocol specification
  42. * SOURCE CODE!
  43.  
  44. There is also a mailing list opennap-admin@lists.sourceforge.net for people
  45. running live servers to share information not directly related to the
  46. development of the server.
  47.  
  48. * For a description of the napster protocol, please see the file 'napster.txt'
  49.   included with this distribution.
  50.  
  51. * INSTALLATION
  52.  
  53.   To install, simply run the `setup' utility (provided with the binary
  54.   distributions, or built from source).
  55.  
  56.   The installation process involves picking a directory where to install
  57.   OpenNap and creating an initial account for administering the server.  By
  58.   default, OpenNap will look for its configuration files in:
  59.  
  60.     C:\opennap            Win32 platforms (Win 95/98/NT/2000)
  61.  
  62.     -or-
  63.  
  64.     /usr/local/share/opennap    Unix platforms
  65.  
  66.   If you wish to install OpenNap in another location, simply enter the new
  67.   directory when `setup' prompts you.
  68.  
  69.   The next step is to create an initial user account for the owner of the
  70.   server.  `setup' will prompt you for the nickname to use, the password for
  71.   the account and your email address (note that you ARE NOT required to
  72.   enter a real email address if you don't want to--simply use the default
  73.   email@here.com if you like)
  74.  
  75.   IF you installed OpenNap in a different directory than the default,
  76.   `setup' will create a config file for you so that opennap knows that it
  77.   is installed in the directory you chose.  However, in order for opennap to
  78.   find this config file, you will have to tell it where the config file is
  79.   when you start the server.  You do this by specifyin the -c command line
  80.   option as such:
  81.  
  82.     opennap -c PATH
  83.  
  84.   where PATH is the _full_ path to the config file.
  85.  
  86.   (NOTE: for Win32 users, `setup' will create a `launch.bat' script in the
  87.   directory you chose to install in which contains the above command so that
  88.   you can simply run the batch file to start the server.  Just make sure you
  89.   copy the opennap.exe executable into that directory first).
  90.   
  91. * Linking Servers
  92.  
  93.   1.  you need to add the dns name of the server you wish to allow to connect
  94.       to your server in the database.  This needs to be done on both
  95.       ends, as it does mutual authentication to prevent bogus servers from
  96.       being able to join.
  97.  
  98.     edit /usr/local/share/opennap/servers (c:\opennap\servers on Win32)
  99.     add:
  100.         <server name> <password> <local_password>
  101.  
  102.     where <server name> is the dns name of the server, and <password>
  103.     is the password for that server to gain access.  <local_password> is
  104.     the password your server uses to authenticate itself to the other
  105.     server (so the two password fields should be swapped on the
  106.     other server).
  107.  
  108.    2.  connect to your server and gain elite access, and execute the
  109.        `server connect' command (currently only BWap has support for
  110.        the opennap commands), specifying the host and port to connect to.
  111.  
  112.        In BWap, you would do:
  113.     /admin connect <server> <port>
  114.        In the windows client or other client which does not natively support
  115.        the opennap extensions, you can do:
  116.     /msg operserv connect <server> <port>
  117.  
  118. * OperServ
  119.  
  120. Since many existing Napster clients can't be extended to make use of the few
  121. opennap specific commands, a pseudo user named OperServ was created which
  122. only responds to private messages from users of level Moderator or above (it
  123. is invisible in all other ways).  It currently supports the following
  124. commands:
  125.  
  126.     cban
  127.     cbanclear
  128.     cbanlist
  129.     chanlevel
  130.     cloak
  131.     cunban
  132.     config
  133.     connect
  134.     disconnect
  135.     kick
  136.     killserver
  137.     links
  138.     reconfig
  139.     register
  140.     stats
  141.     usermode
  142.         this is a `bitmask' of the following modes:
  143.             error, ban, change, channel, kill, level, server,
  144.             muzzle, port, topic, cloak, wallop
  145.         by default they are an enabled, but you can turn selective
  146.         ones off by using the command:
  147.             msg operserv usermode -kill -level
  148.         to turn off kill and user level change notifications.  Note
  149.         that if you specify any mods without a minus prefix, only
  150.         those modes listed will be enabled, and the others turned
  151.         off.  To reenable all mods specify `all'.  To display your
  152.         current usermode, simply use the usermode command with no
  153.         parameters
  154.  
  155. See below in the section `Non-standard messages' for a descripton of the
  156. syntax for these commands.
  157.  
  158. * ChanServ
  159.  
  160. Similar to OperServ, ChanServ is a means of maintaining channels.  It
  161. provides the necessary commands to channel operators for those who don't
  162. have built in client support.  ``/msg chanserv help'' for a list of
  163. all supported commands.
  164.  
  165. * Server to Server messages
  166.  
  167. There are many cases where client commands need to be passed to peer servers
  168. in order to maintain database consistency across all servers.  However, most
  169. of the commands that the clients use don't specify the user who performed
  170. the action.  This implementation borrows from the IRC protcol and prefixes
  171. client commands with
  172.     :user
  173. to indicate to peer servers which user issued the command.  Commands which
  174. already specify the user name, such as the login request (2), are not
  175. prefixed.  Each request handler should have a comment at the beginning
  176. specifying what input it expects.
  177.  
  178. * Extensions to messages
  179.  
  180. 200    search [CLIENT]
  181.  
  182.     TYPE <mime-type>
  183.  
  184.         OpenNap supports other media types besides mp3.  By default,
  185.         searches will only match mp3 files.  A client can however
  186.         search for other media types by specifying a
  187.         partial MIME content-type (audio, video, text, application,
  188.         image).  (See message 10300 for adding media to the database).
  189.         The special keyword `any' will match any media type in the
  190.         database.
  191.  
  192.         The results of the search are returned as with mp3, except
  193.         the fields for bitrate, sample frequency and length are
  194.         meaningless (and are set to 0 in this implmentation).  The
  195.         client can then download as they would any other mp3 file.
  196.  
  197. * Non-standard messages
  198.  
  199. The following messages are not present in the official napster servers, but
  200. are implemented as additional functionality in the opennap server.
  201.  
  202. 10000    client quit [SERVER]
  203.  
  204.     <nick>
  205.  
  206.     the message is sent to peer servers when a client connection has
  207.     closed
  208.  
  209. 10010    server login [SERVER]
  210.  
  211.     <server-name> <nonce> <compression>
  212.  
  213.     <server-name>    the dns name of the server wishing to connect
  214.     <nonce>        a random string to use for authentication
  215.     <compression>    the maximum zip (LZ77) compression level
  216.  
  217.     this message is sent when a connection wishes to identify itself as
  218.     a peer server.  when a server receives this message, it will send its
  219.     own login command to the peer to initial mutual authentication
  220.  
  221. 10011    server login ack [SERVER]
  222.  
  223.     <hash-response>
  224.  
  225.     to authenticate itself, the server will hash the value
  226.         <peer-nonce><nonce><server-pass>
  227.     using the MD5 algorithm.  this allows the servers to mutually
  228.     authenticate without the plaintext passwords traversing the network
  229.  
  230. 10013    user ip [SERVER] (deprecated, this info is now appended to msg 2)
  231.  
  232.     <user> <ip> <port> <server>
  233.  
  234.     this message is used for a server to pass the ip address of a
  235.     locally connected client to its peer servers, since that information
  236.     is not available in the login message.  <ip> is an unsigned long
  237.     integer specifying the ip address for <user>
  238.  
  239. 10014    registration info [SERVER]
  240.  
  241.     <user> <pass> <level> <email> <created> <last-seen>
  242.  
  243.     <pass>        user's password
  244.     <level>        user's default level
  245.     <email>        user's email address
  246.     <created>    time at which the account was created
  247.     <last-seen>    last time the user logged into a server
  248.  
  249.     When a server detects that the user table is out of sync between
  250.     servers, it will send its notion of what the entry should look like
  251.     to all the other servers.  If a receiving server has a matching
  252.     user, it checks the <created> time to see which is the oldest
  253.     entry and updates accordingly.
  254.  
  255. 10018    encapsulated message [SERVER]
  256.  
  257.     :<sender> <recip> <message>
  258.  
  259.     This command allows a server to send a private message to a user on
  260.     a remote server.  <message> should be a well-formed Napster message,
  261.     complete with tag and length header.
  262.  
  263. 10019    server link info [SERVER]
  264.  
  265.     <server> <port> <server> <port> <hops> <bufsize>
  266.  
  267.     This message is used by servers to share information about the
  268.     topology of the linked servers.  when a server joins, a message is
  269.     sent to all other nodes in the cluster.  <hops> is incremented each
  270.     time the message is relayed so that each server knows how far away
  271.     the others are.
  272.  
  273. 10020    server quit [SERVER]
  274.  
  275.     :<server> <server> "<reason>"
  276.  
  277.     This message is used to notify other servers in the group that a
  278.     server has delinked.  The server with the peer connection to the
  279.     server that has quit should send this message.
  280.  
  281. 10021    notify mods [SERVER]
  282.  
  283.     :<server> <loglevel> "<message>"
  284.  
  285.     allows a server to send a message to all logged in moderators.
  286.     primarily used to propogate ban messages when not all servers
  287.     see the connection or login.
  288.  
  289. 10100    server connect [CLIENT]
  290.  
  291.     <server> <port> [ <remote_server> ]
  292.  
  293.     attempts to link the current server to <server>:<port>.  if
  294.     <remote_server> is given, then that server attempts to make the
  295.     link.  this command can be executed by admin level and higher.
  296.  
  297. 10101    server disconnect [CLIENT]
  298.  
  299.     <server> <reason> [ <remote-server> ]
  300.  
  301.     delink current server from <server>.
  302.     must be admin or high level to execute this command
  303.  
  304. 10110    kill server [CLIENT]
  305.  
  306.     <server> <reason>
  307.  
  308.     cause the server to shutdown.  must be elite level to execute
  309.     this command.
  310.  
  311. 10111    remove server [CLIENT]
  312.  
  313.     <server> <reason>
  314.  
  315.     reqeusts that <server> be removed from the table of allowed links.
  316.     must be elite to execute this command
  317.  
  318. 10112    show server links [CLIENT, SERVER]
  319.  
  320.     client: no data
  321.     server: <host> <host> <hops>
  322.  
  323.     This command is used to show information about the links a
  324.     server has to other servers.  The list is terminated by a 10112
  325.     message with no data (0 length).
  326.  
  327. 10115    show server stats [CLIENT, SERVER]
  328.  
  329.     client: no data
  330.     server: <clients> <servers> <files> <gigs> <channels> <time>
  331.     <uptime> <memory> <numusers>
  332.  
  333.     This command is used by administrators to get information about the
  334.     state of the server.
  335.  
  336.     <clients>    number of locally connected clients
  337.     <servers>    number of locally connected servers
  338.     <users>        total number of global users
  339.     <files>        number of files in the db
  340.     <gigs>        total size of all files shared
  341.     <channels>    number of active channels
  342.     <time>        time at which the server was started
  343.     <uptime>    number of seconds of uptime
  344.     <memory>    if debugging is enabled, this will show the memory
  345.             currently in use, otherwise it will be -1
  346.     <numusers>    number of registered users        
  347.  
  348. 10116    server ping [DEPRECATED]
  349.  
  350.     note: there is now a defined command for this in napster.txt
  351.  
  352. 10117    rehash (reload) configuration files [CLIENT]
  353.  
  354.     Format: [server]
  355.  
  356.     Causes [server] to reread its configuration file and reload the
  357.     motd into memory.  If [server] is not specified, the server to which
  358.     the client is connected is affected.
  359.  
  360. 10201    set channel level [CLIENT]
  361.  
  362.     Format: <channel> [level]
  363.  
  364.     sets the minimum user level required to enter <channel> to [level].
  365.     If [level] is not specified, the current channel level is returned.
  366.  
  367.     Example:
  368.  
  369.     Operators Moderator
  370.  
  371.     sets channel "Operators" such that only users with level moderator
  372.     or above may join the channel.
  373.  
  374. 10203    set user mode [CLIENT]
  375.  
  376.     [-]{ALL,MUZZLE,BAN,KILL,PORT,WALLOP} [ ... ]
  377.  
  378. 10204    set channel op [CLIENT]
  379.  
  380.     Format: <channel> <user> [user ...]
  381.  
  382.     enable <user> to kick/ban users on <channel>
  383.  
  384. 10205    remove channel op [CLIENT]
  385.  
  386.     Format: <channel> <user> [user ...]
  387.  
  388.     remove <user> as operator on <channel>
  389.  
  390. 10206    channel op list
  391.  
  392.     Format: <channel>
  393.  
  394.     returns the list of defined channel operators for the given channel
  395.  
  396. 10207    drop channel [CLIENT]
  397.  
  398.     Format: <channel> [ "<reason>" ]
  399.  
  400.     marks the specified channel as being user created such that its
  401.     state is not stored in the persistent channels file and will
  402.     disappear once all users part from it.
  403.  
  404. 10208    send message to channel ops [CLIENT]
  405.  
  406.     Format: <channel> <message>
  407.  
  408.     sends <message> to all operators and mods+ on <channel>
  409.  
  410. 10209    change channel mode [CLIENT, SERVER]
  411.  
  412.     Format: <channel> [mode]
  413.  
  414.     if specified, [mode] is of the form
  415.  
  416.         (+|-)STRING
  417.  
  418.     where STRING is one of
  419.  
  420.         PRIVATE        - makes the channel not show up in the list
  421.         MODERATED    - only ops and mods+ can speak in public
  422.         INVITE        - channel is invite only
  423.         TOPIC        - if set, any user may change the topic
  424.  
  425. 10210    invite user to a channel [CLIENT, SERVER]
  426.  
  427.     Format: <channel> <user>
  428.  
  429.     when a channel is +INVITE, this sends an invitation to a user to
  430.     join the specified channel.  the user issuing the invite must be
  431.     a member of the channel.
  432.  
  433. 10211    give voice to speak in moderated channel [CLIENT]
  434.  
  435.     Format: <channel> [user [user ...]]
  436.  
  437. 10212    remove voice to speak in moderated channel [CLIENT]
  438.  
  439.     Format: <channel> [user [user ...]]
  440.  
  441. 10213    muzzle a user in a specific channel [CLIENT]
  442.  
  443.     Format: <channel> <user> ["reason"]
  444.  
  445. 10214    unmuzzle a user in specific channel [CLIENT]
  446.  
  447.     Format: <channel> <user> ["reason"]
  448.  
  449. 10300    share generic media file [CLIENT]
  450.  
  451.     Format: "<filename>" <size> <md5> <content-type>
  452.  
  453.     <content-type> is the MIME type defined for what the data is.  This
  454.             should be of the form TYPE/SUBTYPE, where TYPE is
  455.             one of: audio, video, text, image, application
  456.  
  457.     Examples:
  458.  
  459.     "C:\IMAGES\Grand Canyon.jpg" 54187 bc938fdc0ef63772bfbdbf57aabb0860-54187 image/jpeg
  460.     "\home\drscholl\src\opennap-0.11.tar.gz" 102161 51c07734811a26853b1a2a87b67c68a1-102161 application/x-gunzip
  461.  
  462. 10301    new browse [CLIENT]
  463.  
  464.     Format: <nick>
  465.  
  466. 10302    new browse result [CLIENT]
  467.  
  468.     Format: <nick> "<path>" <filename> <md5> <size> <bitrate>
  469.         <frequency> <time> [ <filename> ... ]
  470.  
  471. * References
  472.  
  473. RFC1459, the IRC protocol was helpful in implementing many features.
  474.  
  475. http://www.onelist.com/community/napdev/ is a useful community (mailing list)
  476. for discussion of the napster protocol.
  477.